import java.io.*;
import java.util.Scanner;
public class Text {
    public static void main(String[] args) throws Exception{
        FileWriter writer = new FileWriter("D:\\测试\\IO.txt");
        BufferedWriter bw = new BufferedWriter(writer);
        Scanner sc = new Scanner(System.in);
        while (true){
            String str = sc.nextLine();
            if(str.equals("quit")){
                break;
            }else{
                bw.write(str);
                bw.newLine();
            }
        }
        bw.close();
    }
}
